<?php
/**
 * admincp.php
 */

defined('YII_DEBUG') or define('YII_DEBUG', FALSE);
defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);

// On dev display all errors
if(YII_DEBUG) {
	error_reporting(-1);
	//ini_set('display_errors', true);
}else{
	error_reporting(0);
}

//date_default_timezone_set('UTC');

//chdir(dirname(__FILE__).'/../..');


//constant and define
$define = dirname(__FILE__) . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'common' . DIRECTORY_SEPARATOR . 'define.php';

require_once($define);

$common= ROOT .'/common';
require_once($common.'/lib/framework/yii.php');
require_once($common.'/components/WebApplication.php');
require_once($common.'/lib/global.php');

$config=require(ROOT.'/api/protected/config/main.php');


$app = Yii::createApplication('WebApplication', $config);

$app->run();